home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sphigs.lha / SPHIGS / examples / Makefile next >
Encoding:
Makefile  |  1990-11-26  |  986 b   |  42 lines

  1. # This sample Makefile allows you to make any SPHIGS application
  2. #   whose source is exactly one .c file.
  3. #
  4. # It also can be used to make an application made up of a collection
  5. #   of .c files all having a common prefix.
  6. #
  7. # To use this Makefile, you must type:
  8. #
  9. #        make PROG=xxxx
  10. #                  ----
  11. # where
  12. #       xxxx.c is the name of the file you wish to compile, or
  13. #       ----
  14. #
  15. # where
  16. #       xxxx*.c are the names of the files you wish to compile
  17. #       ----
  18.  
  19. SRGPDIR = /cs/src/srgp
  20.  
  21. CC = gcc
  22.  
  23. GCCFLAGS = -fpcc-struct-return
  24. CFLAGS = -g
  25.  
  26. INCLUDE = -I../src/sphigs -I$(SRGPDIR)/src/srgp
  27.  
  28. LDLIBS = -lsphigs -lsrgp -lX11 -lm 
  29. LDFLAGS =  -L$(SRGPDIR)/src/srgp -L../src/sphigs 
  30.  
  31.  
  32. executable:
  33.     $(CC) $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $(PROG)*.c \
  34.         $(LDFLAGS) $(LDLIBS) -o $(PROG)
  35.  
  36. exec_fast: $(PROG)*.o
  37.     $(CC) $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $(PROG)*.o \
  38.         $(LDFLAGS) $(LDLIBS) -o $(PROG)
  39.  
  40. .c.o: ../src/sphigs/*.h
  41.     $(CC) -c $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $*.c
  42.